home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17461 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.magmacom.com!Jan
  2. From: Jan@Bytesmiths.com (Jan Steinman)
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++?
  5. Date: 16 Apr 1996 00:35:15 GMT
  6. Organization: Bytesmiths, the Smalltalk start-up specialists
  7. Message-ID: <Jan-1504962032120001@news.magmacom.com>
  8. References: <3134D499.653E@ix.netcom.com> <313613B2.136E@ksopk.sprint.com> <4i7qhl$ik6@cronkite.seas.gwu.edu> <4iuhi7$fmf@sundog.tiac.net> <4iumap$mn5@hustle.rahul.net> <31582A45.3742@vmark.com> <3163C031.4FB1@esec.ch> <3164888D.2B01@concentric.net> <4kbfn8$1bu@news1.is.net> <316971B0.FEF@amd.com> <Jan-1104960033370001@news.magmacom.com> <31711755.328F@charm.net>
  9. Reply-To: Jan@Bytesmiths.com
  10. NNTP-Posting-Host: 206.116.214.1
  11. X-Newsreader: Yet Another NewsWatcher 2.2.0b6
  12.  
  13. In article <31711755.328F@charm.net>, Bob Arning <arning@charm.net> wrote:
  14.  
  15. > Jan Steinman wrote:
  16. ...
  17. > > Ready, set, go (standard disclaimer, typed in off the top of my head):
  18. > > 
  19. > > | pi n |
  20. > > pi := 0.
  21. > > n := "number of hex digits of precision desired"
  22. > > 1 to: n do: [:i | pi := pi +
  23. > >   ((1 / (16 raisedTo: i) *
  24. > >     ((4 / ((8 * i) + 1)) +
  25. > >     (2 / ((8 * i) + 4)) +
  26. > >     (1 / ((8 * i) + 5)) +
  27. > >     (1 / ((8 * i) + 6))))].
  28. > > pi
  29. > > 
  30. > > Okay, has your C compiler finished yet? :-)
  31. ...
  32. > Your standard disclaimer notwithstanding, it would be a more impressive 
  33. > example if it actually worked. Where does the missing right paren go?
  34.  
  35. Oops! I separated it into one factor and four terms, but I guess I wasn't
  36. counting right. Without the Smalltalk paren-matcher, I'd have to guess it
  37. goes before the square bracket. Sorry!
  38.  
  39.  : Jan Steinman <mailto:Jan@Bytesmiths.com>
  40.  : Bytesmiths, the Smalltalk specialists <http://www.bytesmiths.com>
  41.  : "This is witty signature 1 of 47,288."
  42.